package buffbuildergui;

import java.util.ArrayList;

public class FinishCondition extends Entity{
    @SuppressWarnings("oracle.jdeveloper.java.nested-assignment")
    public FinishCondition() {
        super();
        ArrayList<String> temp = new ArrayList<>(),temp0=null;
        Property p = null;
        Property q = null;
        Property r = null;
        ArrayList<Property> al = null,al0=null;
        temp = new ArrayList<>();
        /*
         * TimeElapsed
            AllOnDelayInstantActionsDone
            EnterHyperspace
            ExitHyperspace
            FirstSpawnerNoLongerHasBuff
            LastSpawnerNoLongerHasBuff
            OutOfRange
            NoTarget
            DamageTaken
            ResearchNotMet
            OwnerChanged
            FightersKilled
            AllPeriodicActionsDone
            AntiMatterDepleted
            TargetIsConstructed
            TargetConstructionCannotBeUpdated
            ShieldFailure
         */
        temp.add("\"AllOnDelayInstantActionsDone\"");
        temp.add("\"AllPeriodicActionsDone\"");
        temp.add("\"AntiMatterDepleted\"");
        temp.add("\"DamageTaken\"");
        temp.add("\"EnterHyperspace\"");
        temp.add("\"ExitHyperspace\"");
        temp.add("\"FightersKilled\"");
        temp.add("\"FirstSpawnerNoLongerHasBuff\"");
        temp.add("\"LastSpawnerNoLongerHasBuff\"");
        temp.add("\"NoTarget\"");
        temp.add("\"OwnerChanged\"");
        temp.add("\"ResearchNotMet\"");
        temp.add("\"ShieldFailure\"");
        temp.add("\"TargetOwnerIsFriendly\"");
        temp.add("\"TargetIsConstructed\"");
        temp.add("\"TargetConstructionCannotBeUpgraded\"");
        temp.add("\"TimeElapsed\"");
        props.add(p=new Property("finishConditionType",Property.FINITE,temp,this));
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
                al.add(q=new Property("damageNeeded",Property.VOID,this));
                doubleLevels(al);
                al0=new ArrayList<>();
                q.plugs.add(al0);
                temp0=new ArrayList<>();
                temp0.add("AFFECTS_ONLY_HULL");
                temp0.add("AFFECTS_ONLY_SHIELDS");
                temp0.add("AFFECTS_SHIELDS_AND_HULL");
                    al0.add(r=new Property("typeOfDamageNeeded",Property.FINITE,temp0,this));
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
                al.add(q=new Property("fightersKilled",Property.VOID,this));
                doubleLevels(al);
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
                al.add(q=new Property("buffTypeToQuery",Property.BUFF,this));
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
                al.add(q=new Property("buffTypeToQuery",Property.BUFF,this));
            p.plugs.add(al = new ArrayList<Property>());
            al = new ArrayList<Property>();
            p.plugs.add(al = new ArrayList<Property>());
            al = new ArrayList<Property>();
            p.plugs.add(al); 
                al.add(q=new Property("researchPrerequisites",Property.VOID,this));
                temp = new ArrayList<>();
                temp.add("0");
                temp.add("1");
                temp.add("2");
                temp.add("3");
                temp.add("4");
                al.add(q=new Property("NumResearchPrerequisites",Property.FINITE,temp,this));
                    al0 = new ArrayList<>();
                    q.plugs.add(al0);
                    al0 = new ArrayList<>();
                    q.plugs.add(al0);
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
                    al0 = new ArrayList<>();
                    q.plugs.add(al0);
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
                    al0 = new ArrayList<>();
                    q.plugs.add(al0);
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
                    al0 = new ArrayList<>();
                    q.plugs.add(al0);
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
                        al0.add(r=new Property("ResearchPrerequisite",Property.VOID,this));
                        al0.add(r=new Property("Subject",Property.QUOTED,this));
                        al0.add(r=new Property("Level",Property.INTEGER,this));
            al = new ArrayList<Property>();
            p.plugs.add(al);
            p.plugs.add(al = new ArrayList<Property>());
            p.plugs.add(al = new ArrayList<Property>());
            p.plugs.add(al = new ArrayList<Property>());
            p.plugs.add(al = new ArrayList<Property>());
                al.add(q=new Property("time",Property.VOID,this));
                doubleLevels(al);
    }
    
    void numResearchPrerequisites(ArrayList<Property> al) {
        ArrayList<String> temp = new ArrayList<>(),temp0=null;
        Property p = null;
        Property q = null;
        Property r = null;
        ArrayList<Property> al0=null;
        temp = new ArrayList<>();
        
        al.add(p=new Property("researchPrerequisites",Property.VOID,this));
        temp = new ArrayList<>();
        temp.add("0");
        temp.add("1");
        temp.add("2");
        temp.add("3");
        temp.add("4");
        al.add(p=new Property("NumResearchPrerequisites",Property.FINITE,temp,this));
            al0 = new ArrayList<>();
            p.plugs.add(al0);
            al0 = new ArrayList<>();
            p.plugs.add(al0);
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
            al0 = new ArrayList<>();
            p.plugs.add(al0);
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
            al0 = new ArrayList<>();
            p.plugs.add(al0);
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
            al0 = new ArrayList<>();
            p.plugs.add(al0);
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
                al0.add(q=new Property("ResearchPrerequisite",Property.VOID,this));
                al0.add(q=new Property("Subject",Property.QUOTED,this));
                al0.add(q=new Property("Level",Property.INTEGER,this));
    }
}
